/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package com.qywx.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qywx.entity.TagRuleEntity;
import com.qywx.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName TagRuleDao
 * @Description: 标签规则dao
 * @Author zwc
 * @Date 2020/3/10
 * @Version V1.0
 **/
@Mapper
@Component
public interface TagRuleDao extends BaseMapper<TagRuleEntity> {

	//根据tagId查询
	List<TagRuleEntity> findByTagId(@Param("tagId")Long tagId,@Param("page")Integer page,@Param("size")Integer size);

	//根据ID修改规则
	void updateTagRuleById(@Param("tagRuleEntity") TagRuleEntity tagRuleEntity);

	//根据tagId查询获得满足条件的记录条数
	Long getTotal(@Param("tagId")Long tagId);

	/**
	 * 根据属性查询标签列表
	 * @param userEntity
	 * @return
	 */
	List<Long> selectByAttribute(@Param("userEntity") UserEntity userEntity);

	/**
	 * 根据属性查询标签列表
	 * @param userEntity
	 * @return
	 */
	List<Long> selectByAttribute1(@Param("userEntity") UserEntity userEntity);
}
